# 使用官方OpenJDK 17基础镜像
FROM openjdk:17

# 设置工作目录
WORKDIR /app

# 复制jar文件到工作目录
COPY ./jar/maku-generator-server.jar  /app/maku-generator-server.jar

# 暴露端口
EXPOSE 8088

# 运行Java应用
CMD ["java", "-jar", "maku-generator-server.jar", "--spring.datasource.url=jdbc:mysql://host.docker.internal:3306/maku_generator?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true"]